package net.zdreamer.shunyi.ui.login;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import net.zdreamer.shunyi.R;
import net.zdreamer.shunyi.ui.HomeActivity;

public class RegistActivity extends Activity implements View.OnClickListener {
    private RelativeLayout title;
    private TextView titlecontent;
    private ImageView leftimg, rightimg, next;
    private Intent intent;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_regist);
        intt();
    }

    private void intt() {
        title = (RelativeLayout) findViewById(R.id.title_item);
        titlecontent = (TextView) findViewById(R.id.title_content);
        leftimg = (ImageView) findViewById(R.id.leftimg);
        rightimg = (ImageView) findViewById(R.id.right_image);
        title.setBackgroundResource(R.drawable.newsbiaoti);
        leftimg.setImageResource(R.drawable.backimg);

        leftimg.setOnClickListener(this);
        rightimg.setOnClickListener(this);

        titlecontent.setText("注册");
        titlecontent.setTextColor(getResources().getColor(R.color.white));

        next = (ImageView) findViewById(R.id.nextnumber);
        next.setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.leftimg:
                this.finish();
                break;
            case R.id.nextnumber:
                intent =new Intent(this, HomeActivity.class);
                startActivity(intent);
                this.finish();
                break;
            default:
                break;

        }
    }
}
